import it.lupo.model.User;
import it.lupo.repository.HibernateSessionFactory;
import it.lupo.repository.dao.UserDAO;


public class testUser {

	public static void main(String[] args) {
		HibernateSessionFactory.getSession().beginTransaction();
		
		UserDAO udao = new UserDAO();
		udao.create(new User("dom122","pi",User.Role.ADMIN));
		udao.create(new User("dom123","pi",User.Role.DEFAULT));
//		
		
		for(User u : udao.findAll())
		{
			System.out.println(u);
		}
		HibernateSessionFactory.getSession().getTransaction().commit();
	}
}
